#include <bits/stdc++.h>
using namespace std;

char buf[(int)5e7];
char *fs = buf;

inline int gn() { 
  int k = 0;
  char c = *fs++;
  for (; !isdigit(c); c = *fs++);
  for (; isdigit(c); c = *fs++) k = k * 10 + c - '0';
  return k;
}

const int maxn = 1e5 + 3;

priority_queue<int, vector<int>, greater<int> > q;

int ind[maxn], oud[maxn], n, m;
bitset<maxn> vis;

struct edge { 
  int to;
  edge *ne;
  edge(int to, edge *ne) : to(to), ne(ne) {}
} *head[maxn];

void addedge(int fr, int to) { 
  head[fr] = new edge(to, head[fr]);
}

void dfs(int x) { 
  for (edge *e = head[x]; e; e = e->ne) { 
    if (vis[e->to]) { 
      puts("-1\n");
      exit(0);
    }
    vis[e->to] = 1;
    dfs(e->to);
    vis[e->to] = 0;
  }
}

int main() { 
  fread(buf, 1, (int)5e7, stdin);
  n = gn(), m = gn();
  for (int i = 1, s, t; i <= m; i++) { 
    s = gn(), t = gn();
    addedge(s, t);
    ind[t]++;
    oud[s]++;
  }
  for (int i = 1; i <= n; i++) {
    dfs(i);
    if (!ind[i])
      q.push(i);
  }
  while (!q.empty()) { 
    int u = q.top();
    q.pop();
    printf("%d ", u);
    for (edge *e = head[u]; e; e = e->ne) { 
      ind[e->to]--;
      if (!ind[e->to]) q.push(e->to);
    }
  }
}
